cell-renderer: Check for NULL return in vfunc start_editing()
authorJonh Wendell <jonh.wendell@intel.com>
Mon, 16 Dec 2013 19:31:50 +0000 (17:31 -0200)
committerJonh Wendell <jonh.wendell@intel.com>
Thu, 19 Dec 2013 13:06:20 +0000 (11:06 -0200)
This virtual function may return NULL, so, let's check if that's
the case and exit the function apropriately.

https://bugzilla.gnome.org/show_bug.cgi?id=720554

gtk/gtkcellrenderer.c

index 3ebe9ae5c0d24b24cc0d452f6d50ee0dc7f87212..aa961e711d2a8a30d2488954e9e70908f8261450 100644 (file)
@@ -876,6 +876,9 @@ gtk_cell_renderer_start_editing (GtkCellRenderer      *cell,
                                                                (GdkRectangle *) background_area,
                                                                (GdkRectangle *) cell_area,
                                                                flags);
+  if (editable == NULL)
+    return NULL;
+
   gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (editable)),
                                GTK_STYLE_CLASS_CELL);